home *** CD-ROM | disk | FTP | other *** search
- on readrecipes starting, ending
- repeat with ii = starting to ending
- put ii
- updateStage()
- set i to the name of member ii of castLib "recipes"
- set RecipeNum to ii
- repeat with j = 1 to the number of lines in the text of member "alco"
- set tempAlco to line j of the text of member "alco"
- if (the text of member i contains RETURN & tempAlco & " ") or (the text of member i contains " " & tempAlco & " ") then
- if the text of field ("alco" & j) = EMPTY then
- put RecipeNum into item 1 of field ("alco" & j)
- next repeat
- end if
- set x to the number of items in field ("alco" & j)
- put RecipeNum into item x + 1 of field ("alco" & j)
- end if
- end repeat
- repeat with j = 1 to the number of lines in the text of member "non-alco"
- set tempAlco to line j of the text of member "non-alco"
- if (the text of member i contains RETURN & tempAlco & " ") or (the text of member i contains " " & tempAlco & " ") then
- if the text of field ("non-alco" & j) = EMPTY then
- put RecipeNum into item 1 of field ("non-alco" & j)
- next repeat
- end if
- set x to the number of items in field ("non-alco" & j)
- put RecipeNum into item x + 1 of field ("non-alco" & j)
- end if
- end repeat
- repeat with j = 1 to the number of lines in the text of member "other"
- set tempAlco to line j of the text of member "other"
- if otherproc(i, tempAlco) = 1 then
- if the text of field ("other" & j) = EMPTY then
- put RecipeNum into item 1 of field ("other" & j)
- next repeat
- end if
- set x to the number of items in field ("other" & j)
- put RecipeNum into item x + 1 of field ("other" & j)
- end if
- end repeat
- set tempSize to line 28 of the text of member i
- if the text of member tempSize = EMPTY then
- put RecipeNum into item 1 of field tempSize
- else
- if (field tempSize contains RecipeNum) = 0 then
- set x to the number of items in field tempSize
- put RecipeNum into item x + 1 of field tempSize
- end if
- end if
- set tempTime to line 25 of the text of member i
- if the text of member tempTime = EMPTY then
- put RecipeNum into item 1 of field tempTime
- next repeat
- end if
- if (field tempTime contains RecipeNum) = 0 then
- set x to the number of items in field tempTime
- put RecipeNum into item x + 1 of field tempTime
- end if
- end repeat
- end
-
- on cleanmats starting, ending
- repeat with ii = starting to ending
- set i to the name of member ii of castLib "lists"
- set the text of member i to EMPTY
- end repeat
- end
-
- on otherproc i, other
- if (the text of member i contains RETURN & other) or (the text of member i contains " " & other) then
- if other = "cream" then
- set creamSet to offset("Cream", the text of member i)
- if (offset("irish cream", the text of member i) + 6) = offset("cream", the text of member i) then
- return 0
- else
- if (offset("icecream", the text of member i) + 3) = offset("cream", the text of member i) then
- return 0
- else
- if (offset("ice cream", the text of member i) + 4) = offset("cream", the text of member i) then
- return 0
- else
- return 1
- end if
- end if
- end if
- else
- if (other = "apple") and (offset("apple", the text of member i) = (offset("pineapple", the text of member i) + 4)) then
- return 0
- else
- if (other = "banana") and ((i = "recipe134") or (i = "recipe174")) then
- return 1
- else
- if (other = "strawberry") and (i = "recipe174") then
- return 1
- else
- if (the text of member "non-alco" contains other) or (the text of member "alco" contains other) then
- set x to offset(other, the text of member i)
- set xx to the number of chars in other + 2
- set doubleApp to char x to x + xx of the text of member i
- if (the text of member "non-alco" contains doubleApp) or (the text of member "alco" contains doubleApp) then
- return 0
- else
- return 1
- end if
- else
- return 1
- end if
- end if
- end if
- end if
- end if
- else
- return 0
- end if
- end
-
- on setrecipenums
- repeat with i = 1 to 174
- set the name of member i of castLib "recipes2" to "recipe" & i
- end repeat
- end
-
- on richtofield
- repeat with i = 1 to 174
- set the text of member i of castLib "recipe fields" to the text of member i of castLib "recipes"
- end repeat
- end
-